@import "utils";

@keyframes searchResultItemAppear {
  0% {
    opacity: 0;
    transform: translateY(32px);
  }
  100% {
    opacity: 1;
    transform: translate(0px);
  }
}

.SearchResultItem {
  color: $oc-gray-9;
  animation: searchResultItemAppear 0.15s ease-in-out;
  animation-fill-mode: forwards;
  .userinfo {
    display: flex;
    align-items: center;
    img {
      width: 3rem;
      height: 3rem;
      object-fit: cover;
      border-radius: 1.5rem;
      box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
    }
    .username {
      margin-left: 1rem;
      font-weight: 600;
      font-size: 0.875rem;
    }
  }
  .img-wrapper {
    width: 100%;
    padding-top: 52.63%;
    position: relative;
    margin-top: 1rem;
    display: block;
    img {
      position: absolute;
      display: block;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  h3,
  p {
    margin: 0;
  }
  h3 {
    font-size: 1.75rem;
    margin-top: 1rem;
    &:hover {
      text-decoration: underline;
      color: $oc-violet-5;
    }
  }
  p {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.25;
    color: $oc-gray-8;
  }
  .subinfo {
    margin-top: 0.75rem;
  }
  @include media("<medium") {
    h3 {
      font-size: 1.5rem;
    }
    p {
      font-size: 1rem;
    }
    .subinfo {
      font-size: 0.875rem;
    }
  }
}

.SearchResultItem + .SearchResultItem {
  border-top: 1px solid $oc-gray-2;
  margin-top: 2rem;
  padding-top: 2rem;
}
